/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.backlog.domain.db;

import java.io.Serializable;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;

/**
 *
 * @author Gleibson Oliveira
 */
@Entity
public class Report implements Serializable{

    @Id @GeneratedValue(strategy=GenerationType.AUTO)
    private int id;
    
    private String text;
    private String problem;
    private double spentHours;

    @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
    @JoinColumn(name="REPORT_ID", nullable=false)
    private List<Report> report;

    //TODO incluir data de criação 
    //TODO incluir id do usuário
    //TODO estudar como vai ficar o report que engloba mais de uma atividade

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getProblem() {
        return problem;
    }

    public void setProblem(String problem) {
        this.problem = problem;
    }

    public double getSpentHours() {
        return spentHours;
    }

    public void setSpentHours(double spentHours) {
        this.spentHours = spentHours;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public List<Report> getReport() {
        return report;
    }

    public void setReport(List<Report> taksReport) {
        this.report = taksReport;
    }

    

}
